<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/teacher/common/header.jsp"%>
<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/admin/teacherUpdate" method="post">
            <div class="x_title">
                <h2>教师信息修改 <i class="fa fa-user"></i></h2>
                <div class="clearfix"></div>
            </div>
            <div class="x_content1">
                <div class="item form-group">
                    <div style="color: red">${error}</div>
                    <input name="loginId" type="hidden" value="${teacher.teacherId}">
                    <input type="hidden" name="id" value="${uTeacher.id}">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">教师工号 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="teacherId" value="${uTeacher.teacherId}" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="name" value="${uTeacher.name}">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">联系电话 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="mobilePhone" value="${uTeacher.mobilePhone}">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学院<span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="college">
                            <c:forEach var="colleges" items="${colleges}">
                                <option value="${colleges.college}" <c:if test="${uTeacher.college==colleges.college}">selected="selected"</c:if>>
                                        ${colleges.college}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">教师类型 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="teacherType" value="${uTeacher.teacherType}" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="radio" name="sex" value="0" <c:if test="${uTeacher.sex== '0'}">checked="checked"</c:if>>男
                        <input type="radio" name="sex" value="1" <c:if test="${uTeacher.sex== '1'}">checked="checked"</c:if>>女
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">类型<span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="radio" name="type" value="2" <c:if test="${uTeacher.type== '2'}">checked="checked"</c:if>>普通用户
                        <input type="radio" name="type" value="3" <c:if test="${uTeacher.type== '3'}">checked="checked"</c:if>>管理员
                    </div>
                </div>
            </div>
            <div style="text-align: center">
                <button type="submit"  class="btn btn-success">保存修改</button>
                <button type="button" class="btn btn-primary" onclick="javascript:window.history.back(-1);">返回</button>
            </div>
        </form>
        <br/><br/><br/>
    </div>
</div>
<%@include file="/WEB-INF/jsp/teacher/common/footer.jsp"%>